package com.scatteredServer.service;

import com.scatteredServer.common.Result;
import com.scatteredServer.pojo.entity.Posting;
import com.baomidou.mybatisplus.extension.service.IService;
import com.scatteredServer.pojo.form.add.AddIndexNotice;
import com.scatteredServer.pojo.form.add.AddPosting;
import com.scatteredServer.pojo.form.add.AddPostingNotice;
import com.scatteredServer.pojo.form.update.UpdateNotice;
import com.scatteredServer.pojo.form.update.UpdatePostingDetails;
import com.scatteredServer.pojo.form.update.UpdateRoughlyPosting;
import com.scatteredServer.pojo.query.NoticeQuery;
import com.scatteredServer.pojo.query.PostingQuery;
import com.scatteredServer.pojo.query.ReadStatusQuery;
import com.scatteredServer.pojo.vo.*;
import jakarta.mail.internet.AddressException;

import java.io.UnsupportedEncodingException;
import java.util.List;
import java.util.Map;

/**
* @author admin
* @description 针对表【posting(发文表)】的数据库操作Service
* @createDate 2024-04-05 15:28:11
*/
public interface PostingService extends IService<Posting> {

    Result<BaseVo<PostingRoughlyVo>> getList(PostingQuery postingQuery);

    Result<PostingDetailsVo> getDetailsById(String id);

    Result<String> addOne(AddPosting addPosting);

    Result<List<TeacherInfoMap>> getSelector();

    Result<String> deleteByIds(List<Integer> list);

    Result<String> updateRoughlyById(UpdateRoughlyPosting updateRoughlyPosting);

    Result<String> updateDetailsById(UpdatePostingDetails updatePostingDetails);

    Result<BaseVo<PostingReadStatusVo>> getNoticeList(NoticeQuery noticeQuery);

    Result<String> sendRead(UpdateNotice updateNotice);

    Result<ReadStatusTeacher> getReadStatus(ReadStatusQuery readStatusQuery);

    Result<String> getMinTimeById(String postingId);

    Result<String> sendIndexNotice(AddIndexNotice addIndexNotice) throws UnsupportedEncodingException, AddressException;

    Result<String> addTeachersForPosting(AddPostingNotice addPostingNotice);

    Result<String> deleteTeachersForPosting(AddPostingNotice addPostingNotice);

    Result<BaseVo<PostingRoughlyTeacherVo>> getListByTeacherId(PostingQuery postingQuery);

    Result<PostingStatusVo> postingStatus();

    Result<JobStatusVo> jobCount();

    Result<List<ServiceCountVo>> serviceCount(String year);
}
